package com.mooneros.study.designpattern.factory;


import java.util.ArrayList;
import java.util.List;

/**
 * @author mac
 */
public class TestFactoryPattern {


    public static void main(String[] args) {
        List<BaseProcess> processes = new ArrayList<>();
        processes.add(new Process_1());
        processes.add(new Process_2());
        processes.add(new Process_3());

        // 增强for
        for(BaseProcess baseProcess : processes) {
            baseProcess.execute();
        }

    }

}
